package com.eddie.community.service;

import com.eddie.community.util.RedisKeyUtil;
import org.springframework.dao.DataAccessException;
import org.springframework.data.redis.connection.RedisConnection;
import org.springframework.data.redis.connection.RedisStringCommands;
import org.springframework.data.redis.core.RedisCallback;

import java.util.ArrayList;
import java.util.Calendar;
import java.util.Date;
import java.util.List;

/**
 * Description:数据统计业务
 * Date: 2021/3/4 0004 17:22
 * Author: Eddie.Zhan
 * Email: eddie_zhan@yeah.net
 */
public interface StatisticsService {

    // 将指定的IP计入UV
    void recordUV(String ip);

    // 统计指定日期范围内的UV
    long calculateUV(Date start, Date end);

    // 将指定用户计入DAU
    void recordDAU(int userId);

    // 统计指定日期范围内的DAU
    long calculateDAU(Date start, Date end);

}
